package fti.uksw.ruang.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Guest implements Parcelable {
public final static String TAG = "guest";
    
    public final static String TABLEBNAME = "tbguest";
    public final static String ID = "id";
    public final static String IDEVENT = "id_event";
    public final static String IDDOSEN = "id_dosen";            
    
    private int id;
    private int idEvent;
    private int idDosen;
    
    private Dosen d;

    public Guest(){}
    
    public Guest(Parcel in){
    	readFromParcel(in);
    }
    
    public void setDosen(Dosen d){
    	this.d = d;
    }
    
    public Dosen getDosen(){
    	return d;
    }
    
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getIdDosen() {
        return idDosen;
    }

    public void setIdDosen(int idDosen) {
        this.idDosen = idDosen;
    }

    public int getIdEvent() {
        return idEvent;
    }

    public void setIdEvent(int idEvent) {
        this.idEvent = idEvent;
    }

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeInt(id);
		dest.writeInt(idEvent);
		dest.writeInt(idDosen);
		dest.writeParcelable(d, flags);
	}
	
	private void readFromParcel(Parcel in) {
	    id = in.readInt();
	    idEvent = in.readInt();
	    idDosen = in.readInt();
	    d = in.readParcelable(Dosen.class.getClassLoader());
	}

	public static final Parcelable.Creator<Guest> CREATOR = new Parcelable.Creator<Guest>() {

		@Override
		public Guest createFromParcel(Parcel source) {
			return new Guest(source);
		}

		@Override
		public Guest[] newArray(int size) {
			return new Guest[size];
		}
	};
    
}
